\documentclass{article}

\usepackage{pgfplots}
\usepackage[margin=0cm]{geometry}

\pgfplotsset{compat=1.13}
\usepgfplotslibrary{patchplots}

\begin{document}

\parskip=20pt
\parindent=0pt


\pgfkeys{
	/c/none/.initial=,
	/c/00/.initial={color=red},
	/c/10/.initial={color=blue},
	/c/20/.initial={color=yellow},
	%
	/c/01/.initial={color=black},
	/c/11/.initial={color=brown},
	/c/21/.initial={color=magenta},
	%
	/c/02/.initial={color=green},
	/c/12/.initial={color=red},
	/c/22/.initial={color=gray},
	%
	%
}
\def\PLOT[#1]{%
	\addplot[point meta=explicit symbolic,mesh/color input=explicit,#1]
	coordinates {
	(0,0) [\pgfkeysvalueof{/c/00}] (1,0) [\pgfkeysvalueof{/c/10}] (2,0) [\pgfkeysvalueof{/c/20}]

	(0,1) [\pgfkeysvalueof{/c/01}] (1,1) [\pgfkeysvalueof{/c/11}] (2,1) [\pgfkeysvalueof{/c/21}]

	(0,2) [\pgfkeysvalueof{/c/02}] (1,2) [\pgfkeysvalueof{/c/12}] (2,2) [\pgfkeysvalueof{/c/22}]
	};
}%

\foreach \A/\spacing in {%
	none/\\,%
	00/~,10/~,20/\\,%
	01/~,11/~,21/\\,%
	02/~,12/~,22/\\%
}{%
	\begin{tikzpicture}
		%\tracingmacros=2 \tracingcommands=2
		\begin{axis}[
			small,
			axis on top,
			y dir=reverse,
			%enlargelimits={abs=1},
			enlargelimits=false,
			shader=flat corner,
			patch type=bilinear,
			title=\A\space cleared,
		]

		\PLOT[surf, mesh input=image,/c/\A={}]

		\PLOT[mark=*,%scatter,
			mark size=4pt,only marks]
			
		\end{axis}
	\end{tikzpicture}\spacing
}

\end{document}

